#include "stdafx.h"
#include "HistoryDataSetUnionWriter.h"

namespace DataManager
{

void HistoryDataSetUnionReader::InitChannelInfo()
{
	const ChannelInfoMetaData&  channel_info = channel_info_meta_data_reader_.GetChannelInfoMetaData();
	int  channel_size = channel_info.GetChannelSize();
	std::wstring	channel_file_name;
	int channel_id;
	for(int i=0;i<channel_size;++i)
	{
		channel_file_name = channel_info.GetChannelAt(i).channel_file_name;
		channel_id = channel_info.GetChannelAt(i).channel_id;
		if(channel_file_name != _T(""))
			CreateNewDataSet(channel_file_name,channel_id );
	}
}

void HistoryDataSetUnionReader::InitChannelInfoMetaDataReader( const std::wstring& file_name )
{
	channel_info_meta_data_reader_.Init(file_name);
}
}